package com.ruoyi.supplier.domain;

import java.math.BigDecimal;
import java.util.List;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 采购对象 tb_purchase
 * 
 * @author ruoyi
 * @date 2021-02-16
 */
public class TbPurchase extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 采购批次号 */
    @Excel(name = "采购批次号")
    private String purchaseNumber;

    /** 供应商ID */
    @Excel(name = "供应商ID")
    private Long supplierId;

    /** 供应商名称 */
    @Excel(name = "供应商名称")
    private String supplierName;

    /** 预计供货日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "预计供货日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date deliveryDate;


    /** 总金额 */
    @Excel(name = "总金额")
    private BigDecimal totalAmount;

    /** 采购状态*/
    private Integer status;

    /** 采购明细信息 */
    private List<TbPurchaseDetail> tbPurchaseDetailList;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setPurchaseNumber(String purchaseNumber) 
    {
        this.purchaseNumber = purchaseNumber;
    }

    public String getPurchaseNumber() 
    {
        return purchaseNumber;
    }
    public void setSupplierId(Long supplierId) 
    {
        this.supplierId = supplierId;
    }

    public Long getSupplierId() 
    {
        return supplierId;
    }
    public void setSupplierName(String supplierName) 
    {
        this.supplierName = supplierName;
    }

    public String getSupplierName() 
    {
        return supplierName;
    }
    public void setDeliveryDate(Date deliveryDate) 
    {
        this.deliveryDate = deliveryDate;
    }

    public Date getDeliveryDate() 
    {
        return deliveryDate;
    }

    public void setTotalAmount(BigDecimal totalAmount) 
    {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getTotalAmount() 
    {
        return totalAmount;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public List<TbPurchaseDetail> getTbPurchaseDetailList()
    {
        return tbPurchaseDetailList;
    }

    public void setTbPurchaseDetailList(List<TbPurchaseDetail> tbPurchaseDetailList)
    {
        this.tbPurchaseDetailList = tbPurchaseDetailList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("purchaseNumber", getPurchaseNumber())
            .append("supplierId", getSupplierId())
            .append("supplierName", getSupplierName())
            .append("deliveryDate", getDeliveryDate())
            .append("totalAmount", getTotalAmount())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .append("tbPurchaseDetailList", getTbPurchaseDetailList())
            .toString();
    }
}
